# -*- coding: utf-8 -*-


# print(money)


# def convert_currency(im, out):
#     """
#         货币兑换函数
#     """
#     return im * out


def main():
    USD_VS_RMB = 6.77

    currency_str_value = input('请输入金额:')

    unit = currency_str_value[-3:]

    if unit == 'CNY':
        exchange_rate = 1 / USD_VS_RMB
    elif unit == 'USD':
        exchange_rate = USD_VS_RMB
    else:
        exchange_rate = -1

    if exchange_rate != -1:
        in_money = eval(currency_str_value[:-3])
        convert_currency = lambda x: x * exchange_rate
        out_money = convert_currency(in_money)
        print("转换后的金额:", out_money)

    else:
        print("请输出正确的带单位的货币")


if __name__ == '__main__':
    main()
